package com.ruoyi.system.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ExamStudentMapper;
import com.ruoyi.system.domain.ExamStudent;
import com.ruoyi.system.service.IExamStudentService;

import javax.xml.crypto.Data;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author ruoyi
 * @date 2022-11-20
 */
@Service
public class ExamStudentServiceImpl implements IExamStudentService
{
    @Autowired
    private ExamStudentMapper examStudentMapper;

    /**
     * 查询【请填写功能名称】
     *
     * @param examId 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public ExamStudent selectExamStudentByExamId(Long examId)
    {
        return examStudentMapper.selectExamStudentByExamId(examId);
    }

    /**
     * 查询【请填写功能名称】列表
     *
     * @param examStudent 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<ExamStudent> selectExamStudentList(ExamStudent examStudent)
    {
        return examStudentMapper.selectExamStudentList(examStudent);
    }

    /**
     * 新增【请填写功能名称】
     *
     * @param examStudent 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertExamStudent(ExamStudent examStudent)
    {
        Date date=new Date();
        examStudent.setSubmitTime(date);
        return examStudentMapper.insertExamStudent(examStudent);
    }

    /**
     * 修改【请填写功能名称】
     *
     * @param examStudent 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateExamStudent(ExamStudent examStudent)
    {
        return examStudentMapper.updateExamStudent(examStudent);
    }

    /**
     * 批量删除【请填写功能名称】
     *
     * @param examIds 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteExamStudentByExamIds(Long[] examIds)
    {
        return examStudentMapper.deleteExamStudentByExamIds(examIds);
    }

    /**
     * 删除【请填写功能名称】信息
     *
     * @param examId 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteExamStudentByExamId(Long examId)
    {
        return examStudentMapper.deleteExamStudentByExamId(examId);
    }
}
